<template>
    <div class="mui-card">
        <div class="mui-card-header">{{ goodsInfo.title }}</div>
        <div class="mui-card-content">
            <div class="mui-card-content-inner" v-html="goodsInfo.content">

            </div>
        </div>
    </div>
</template>

<script>
    import {Toast} from "mint-ui"

    export default {

        data(){
            return {
                id:this.$route.params.id,
                goodsInfo:[]
            }
        },
        created(){
            this.getGoodsInfo();
        },
        methods:{
            getGoodsInfo(){
                this.$http.get("api/goods/getdesc/" + this.id).then(result=>{
                    if(result.body.status === 0){
                        this.goodsInfo = result.body.message[0];
                    }else{
                        Toast("获取商品信息失败");
                    }
                });
            }
        }
    }
</script>

<style scoped>
    image{
        width: 100%;
    }
</style>